 n = int(input("请输入一个整数（不等于1）："))
ex = True
while ex:
    flag = 1
    for i in range(2,n):
        if n%i==0:
            flag=0
            break
    if flag==1:
        print(n)
        break
    n+=1
